package il.ac.bgu.soa2009.hw5;

public class AdminPortTypeProxy implements il.ac.bgu.soa2009.hw5.AdminPortType {
  private String _endpoint = null;
  private il.ac.bgu.soa2009.hw5.AdminPortType adminPortType = null;
  
  public AdminPortTypeProxy() {
    _initAdminPortTypeProxy();
  }
  
  public AdminPortTypeProxy(String endpoint) {
    _endpoint = endpoint;
    _initAdminPortTypeProxy();
  }
  
  private void _initAdminPortTypeProxy() {
    try {
      adminPortType = (new il.ac.bgu.soa2009.hw5.RestaurantServiceServiceLocator()).getAdminRestaurantService();
      if (adminPortType != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)adminPortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)adminPortType)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (adminPortType != null)
      ((javax.xml.rpc.Stub)adminPortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public il.ac.bgu.soa2009.hw5.AdminPortType getAdminPortType() {
    if (adminPortType == null)
      _initAdminPortTypeProxy();
    return adminPortType;
  }
  
  public void setRestaurantType(il.ac.bgu.soa2009.hw5.schema.RestaurantType parameter) throws java.rmi.RemoteException{
    if (adminPortType == null)
      _initAdminPortTypeProxy();
    adminPortType.setRestaurantType(parameter);
  }
  
  public void setTablesNumber(java.math.BigInteger parameter) throws java.rmi.RemoteException{
    if (adminPortType == null)
      _initAdminPortTypeProxy();
    adminPortType.setTablesNumber(parameter);
  }
  
  public void setOpeningHours(il.ac.bgu.soa2009.hw5.schema.OpenHour[] parameter) throws java.rmi.RemoteException{
    if (adminPortType == null)
      _initAdminPortTypeProxy();
    adminPortType.setOpeningHours(parameter);
  }
  
  
}